﻿using PicoContainer;
using XEvolve.Core.Runtime;
using XEvolve.Presentation.Markup;

namespace XEvolve.Presentation.Internal
{
    internal class MarkupManager : IStartable
    {
        private readonly Platform platform;

        public MarkupManager(Platform platform)
        {
            this.platform = platform;
        }

        public void Start()
        {
            ServiceLocatorExtension.ServiceLocator = platform.ServiceLocator;
            ExtensionsExtension.Registry = platform.Registry;
        }

        public void Stop()
        {
            ServiceLocatorExtension.ServiceLocator = null;
            ExtensionsExtension.Registry = null;
        }
    }
}